<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我要理财-迅泊达</title>
    <link rel="shortcut icon" href="/static/favicon.ico"/>
    <link rel="stylesheet" href="${_front_font}/iconfont.css">
    <link rel="stylesheet" href="${_front_css}/base_new.css">
    <link rel="stylesheet" href="${_front_css}/library.css">
    <link rel="stylesheet" href="${_front_css}/style.css">
    <script src="${_front_js}/jquery-1.11.1.min.js"></script>
    <script src="${_front_js}/jquery.countdown.js"></script>
    <script src="${_front_js}/js.js"></script>
    <style type="text/css">
    .clearfix .fl i{font-size:22px;}
    /*.screenList .cnt .clearfix dt{background:#72c6f7;color:#fff;border-radius:3px;}*/
    /*页码样式*/
	.tcdPageCode {text-align: center; margin:50px 0;}
	.tcdPageCode a{padding: 8px 16px; background: #fff; border:1px solid #ececec; margin: 0 5px;-moz-border-radius: 2px;-webkit-border-radius: 2px;-o-border-radius: 2px;border-radius: 2px;*zoom:1;color: #a6a6a6; font-size:14px;}
	.tcdPageCode span{padding: 8px 16px; background: #fff; border:1px solid #ececec; margin: 0 5px;-moz-border-radius: 2px;-webkit-border-radius: 2px;-o-border-radius: 2px;border-radius: 2px;*zoom:1;color: #a6a6a6; font-size:14px;	}
	.tcdPageCode a:hover{color: #fff; background: #3d9af0;}
	.tcdPageCode .current{color: #fff; background: #3d9af0;}
	.paramsList .clearfix dd:hover{background:#72c6f7;border-radius:3px;color:#fff;}
    </style>
</head>
<body>
<div class="content">
  	<#include "../base/top.ftl" />
    <div id="financeMain">
        <div class="financeBan">
            <ul class="cnt clearfix">
                <li class="fl"><p><#if count?exists>${count?string(",##0")!}</#if>人</p><span>累计投资人</span></li>
                <!--<li class="fl"><p>8<i>亿</i>1230<i>万</i>4010.88<i>元</i></p><span>累计投资额</span></li>
                <li class="fl last"><p>1<i>亿</i>1192<i>万</i>3310.22<i>元</i></p><span>累计收益</span></li>-->
                <li class="fl"><p><#if amount?exists>${amount?string(",##0.00")!}</#if>元</i></p><span>累计投资额</span></li>
                <li class="fl last"><p><#if income?exists>${income?string(",##0.00")!}</#if>元</i></p><span>累计收益</span></li>
            </ul>
        </div>
        <div class="financeTab">
            <div class="screenItem">
                <ul class="cnt clearfix" id="productList">
                    <li p="-1" <#if productId?exists && productId = -1>class="hover"</#if>>全部项目<#if productId?exists && productId = -1><span class="arrow"></span></#if></li>
                    <li p="3" <#if productId?exists && productId = 3>class="hover"</#if>>车贷E通<#if productId?exists && productId = 3><span class="arrow"></span></#if></li>
                    <li p="4" <#if productId?exists && productId = 4>class="hover"</#if>>车商贷<#if productId?exists && productId = 4><span class="arrow"></span></#if></li>
                    <li p="5" <#if productId?exists && productId = 5>class="hover"</#if>>房E贷<#if productId?exists && productId = 5><span class="arrow"></span></#if></li>
                    <li p="6" <#if productId?exists && productId = 6>class="hover"</#if>>商易贷<#if productId?exists && productId = 6><span class="arrow"></span></#if></li>
                    <!--<li>承兑通</li>-->
                    <li p="7" <#if productId?exists && productId = 7>class="hover"</#if>>抵押贷<#if productId?exists && productId = 7><span class="arrow"></span></#if></li>
                    <li p="10" <#if productId?exists && productId = 10>class="hover"</#if>>项目贷<#if productId?exists && productId = 10><span class="arrow"></span></#if></li>
                    <li p="change" <#if type?exists && type = 'change'>class="hover"</#if>>债权转让<#if type?exists && type = 'change'><span class="arrow"></span></#if></li>
                </ul>
            </div>
            <div class="screenList">
                <div class="cnt paramsList">
	                <#if type?exists && type='borrow'>
	                    <dl class="clearfix">
	                        <dt>投资期限：</dt>
	                        <dd h="/invest/list?productId=${productId}&deadline=-1&paymentMode=${paymentMode!}&full=${full!}" <#if deadline?exists && deadline==-1>class="hover"</#if>>全部</dd>
	                        <dd h="/invest/list?productId=${productId}&deadline=0&paymentMode=${paymentMode!}&full=${full!}" <#if deadline?exists && deadline==0>class="hover"</#if>>一个月以内</dd>
	                        <dd h="/invest/list?productId=${productId}&deadline=1&paymentMode=${paymentMode!}&full=${full!}" <#if deadline?exists && deadline==1>class="hover"</#if>>1-3个月</dd>
	                        <dd h="/invest/list?productId=${productId}&deadline=2&paymentMode=${paymentMode!}&full=${full!}" <#if deadline?exists && deadline==2>class="hover"</#if>>4-6个月</dd>
	                        <dd h="/invest/list?productId=${productId}&deadline=6&paymentMode=${paymentMode!}&full=${full!}" <#if deadline?exists && deadline==6>class="hover"</#if>>6个月以上</dd>
	                    </dl>
	                    <dl class="clearfix">
	                        <dt>还款方式：</dt>
	                        <dd h="/invest/list?productId=${productId}&deadline=${deadline!}&paymentMode=-1&full=${full!}" <#if paymentMode?exists && paymentMode==-1>class="hover"</#if>>全部</dd>
	                        <dd h="/invest/list?productId=${productId}&deadline=${deadline!}&paymentMode=1&full=${full!}" <#if paymentMode?exists && paymentMode==1>class="hover"</#if>>一次性还款</dd>
	                        <dd h="/invest/list?productId=${productId}&deadline=${deadline!}&paymentMode=2&full=${full!}" <#if paymentMode?exists && paymentMode==2>class="hover"</#if>>等额本息</dd>
	                        <dd h="/invest/list?productId=${productId}&deadline=${deadline!}&paymentMode=3&full=${full!}" <#if paymentMode?exists && paymentMode==3>class="hover"</#if>>按期付息到期还本</dd>
	                    </dl>
	                    <dl class="clearfix last">
	                        <dt>产品状态：</dt>
	                        <dd h="/invest/list?productId=${productId}&deadline=${deadline!}&paymentMode=${paymentMode!}&full=-1" <#if full?exists && full==-1>class="hover"</#if>>全部</dd>
	                        <dd h="/invest/list?productId=${productId}&deadline=${deadline!}&paymentMode=${paymentMode!}&full=0" <#if full?exists && full==0>class="hover"</#if>>可投</dd>
	                        <dd h="/invest/list?productId=${productId}&deadline=${deadline!}&paymentMode=${paymentMode!}&full=1" <#if full?exists && full==1>class="hover"</#if>>已满</dd>
	                    </dl>
	                <#else>
	                	<dl class="clearfix">
	                        <dt>转让期数：</dt>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=-1&changeMoney=<#if changeMoney??>${changeMoney!}</#if>&status=<#if status??>${status!}</#if>&full=<#if full??>${full!}</#if>" <#if period?exists && period==-1>class="hover"</#if>>全部</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=1&changeMoney=${changeMoney!}&status=${status!}&full=${full!}" <#if period?exists && period==1>class="hover"</#if> >3期以下</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=2&changeMoney=${changeMoney!}&status=${status!}&full=${full!}" <#if period?exists && period==2>class="hover"</#if> >3-6期</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=3&changeMoney=${changeMoney!}&status=${status!}&full=${full!}" <#if period?exists && period==3>class="hover"</#if> >6-9期</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=4&changeMoney=${changeMoney!}&status=${status!}&full=${full!}" <#if period?exists && period==4>class="hover"</#if> >9-12期</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=5&changeMoney=${changeMoney!}&status=${status!}&full=${full!}" <#if period?exists && period==5>class="hover"</#if> >12期以上</dd>
	                    </dl>
	                    <dl class="clearfix">
	                        <dt>转让金额：</dt>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=<#if period??>${period}</#if>&changeMoney=-1&status=<#if status??>${status!}</#if>&full=<#if full??>${full!}</#if>" <#if changeMoney?exists && changeMoney==-1>class="hover"</#if> >全部</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=<#if period??>${period}</#if>&changeMoney=1&status=<#if status??>${status!}</#if>&full=<#if full??>${full!}</#if>" <#if changeMoney?exists && changeMoney==1>class="hover"</#if> >1000以下</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=<#if period??>${period}</#if>&changeMoney=2&status=<#if status??>${status!}</#if>&full=<#if full??>${full!}</#if>" <#if changeMoney?exists && changeMoney==2>class="hover"</#if> >1000-5000</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=<#if period??>${period}</#if>&changeMoney=3&status=<#if status??>${status!}</#if>&full=<#if full??>${full!}</#if>" <#if changeMoney?exists && changeMoney==3>class="hover"</#if> >5000-10000</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=<#if period??>${period}</#if>&changeMoney=4&status=<#if status??>${status!}</#if>&full=<#if full??>${full!}</#if>" <#if changeMoney?exists && changeMoney==4>class="hover"</#if> >10000-50000</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=<#if period??>${period}</#if>&changeMoney=5&status=<#if status??>${status!}</#if>&full=<#if full??>${full!}</#if>" <#if changeMoney?exists && changeMoney==5>class="hover"</#if> >50000-100000</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=<#if period??>${period}</#if>&changeMoney=6&status=<#if status??>${status!}</#if>&full=<#if full??>${full!}</#if>" <#if changeMoney?exists && changeMoney==6>class="hover"</#if> >100000以上 </dd>
	                    </dl>
	                    <dl class="clearfix last">
	                        <dt>转让状态：</dt>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=<#if period??>${period}</#if>&changeMoney=<#if changeMoney??>${changeMoney!}</#if>&status=all" <#if status?exists && status=='all'>class="hover"</#if> >全部</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=<#if period??>${period}</#if>&changeMoney=<#if changeMoney??>${changeMoney!}</#if>&status=T" <#if status?exists && status=='T'>class="hover"</#if>  >未完成</dd>
	                        <dd h="/invest/list?type=change&productId=<#if productId??>${productId}</#if>&period=<#if period??>${period}</#if>&changeMoney=<#if changeMoney??>${changeMoney!}</#if>&status=Y" <#if status?exists && status=='Y'>class="hover"</#if>  >已完成</dd>
	                    </dl>
	                </#if>
                </div>
            </div>
        </div>
        <div class="item cnt">
        <#if type?exists && type='borrow'>
            <#if (pageInfo?exists && pageInfo?size>0)>
            	<#list pageInfo.pageList as model>
            		<div class="investmentItem">
		                <a href="/invest/detail?id=${model.id}">
		                    <h2 class="title">
		                    <u>
		                    <#if model.productId?? && model.productId = 3>E
		                    <#elseif model.productId?? && model.productId = 4>车
		                    <#elseif model.productId?? && model.productId = 5>房
		                    <#elseif model.productId?? && model.productId = 6>商
		                    <#elseif model.productId?? && model.productId = 7>押
		                    <#elseif model.productId?? && model.productId = 10>贷
		                    </#if>
		                    </u>
		                    ${model.title!}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		                    <em>
		                    <#if model.paymentMode?? && model.paymentMode = 1>${model.productName!}，一次性还款
		                    <#elseif model.paymentMode?? && model.paymentMode = 2>${model.productName!}，等额本息
		                    <#elseif model.paymentMode?? && model.paymentMode = 3>${model.productName!}，按期付息到期还本
		                    </#if>
		                    </em> 
		                    <em style="margin-left:55px;">是否债权回购标：<#if model.isBuyBack??&&model.isBuyBack=="Y">是<#else>否</#if></em>
		                    <i>开标日期：<#if model.timingShow?exists>${model.timingShow?string("yyyy-MM-dd HH:mm:dd")!}<#else>${model.createTime?string("yyyy-MM-dd HH:mm:dd")!}</#if></i></h2>
		                    <ul class="money clearfix">
		                        <li class="moneyL fl">
		                          <#if model.dateUtil?? && model.dateUtil = 'MONTH'>
                                 <p>
                               	  	年收益率：<span>${(model.percent)?string("0.00")}%</span>
                                 </p>
                               <#elseif model.dateUtil?? && model.dateUtil = 'DAY'>
                                 <p>
                               		天收益率：<span>${(model.percent/360)?string("0.000")}%</span>
                               	 </p>
                               </#if>
		                        </li>
		                        <li class="moneyC fl"><p>投标金额：<span>${model.amount?string(",##0.00")!}</span>元</p></li>
		                        <li class="moneyR fl">
                               	<#if model.dateUtil?? && model.dateUtil = 'MONTH'>
                               		<p>投标期限：<span>${model.deadline!}</span>个月</p>
                               	<#elseif model.dateUtil?? && model.dateUtil = 'DAY'>
                               		<p>投标期限：<span>${model.deadline}</span>天</p>
                               	</#if>
                               </li>
		                    </ul>
		                    <div class="schedule clearfix">
		                        <div class="scheduleL fl">
		                            <span class="fl">投标进度：</span>
		                            <div class="progressBarWrap fl">
		                                <div class="progressBar" style="width:${model.schedules!}%"></div>
		                                <span class="progressData">${model.schedules!}%</span>
		                            </div>
		                        </div>
		                        <#if model.countDown?exists>
									<div class="scheduleR fr clearfix" id="holder${model.id}">
			                            <div class="fl countdownTxt">
			                                <em>投标倒计时：</em>
			                            </div>
			                            <div class="digits fr" style="margin-right:-34px;" id="digits${model.id}"></div>
			                            <script type="text/javascript">
				                            $(function(){
				                                $("#digits${model.id}").countdown({
				                                    image: "${_front_images}/countdown_bg.png",
				                                    format: "hh:mm:ss",
				                                    startTime: "${model.countDown}",
				                                    timerEnd:function(){
				                                    	$("#holder${model.id}").before('<p class="scheduleR fr" style="margin-right:0px;">可投剩余金额：<span>${model.notTenderMoney?string(",##0.00")}</span> 元</p>');
														$("#holder${model.id}").remove();
														$("#tender${model.id}").attr("href","/invest/detail?id=${model.id}").css("background","#f06a11");
				                                    }
				                                });
				                            });
				                        </script>
			                        </div>
                               <#else>
	                               <p class="scheduleR fr" style="margin-right:0px;">可投剩余金额：<span>${model.notTenderMoney?string(",##0.00")}</span> 元</p>
                               </#if>
		                    </div>
		                </a>
		                <#if model.status?exists && model.status = "complete">
                    		<a href="/invest/detail?id=${model.id}" class="status" style="background:#ccc;">已还完</a>
                    	<#elseif model.status?exists && model.status = "check">
                    		<a href="/invest/detail?id=${model.id}" class="status" style="background:#ccc;">复审中</a>
                    	<#elseif model.status?exists && model.status = "pay">
                    		<#if model.isBuyBack?? && model.isBuyBack =="Y">
	                    		<a href="/invest/detail?id=${model.id}" class="status" style="background:#ccc;">回购中</a>
                    		<#else>
	                    		<a href="/invest/detail?id=${model.id}" class="status" style="background:#ccc;">还款中</a>
                    		</#if>
                    	<#elseif model.status?exists && model.status = "borrow" || model.status = "new">
                    		<#if model.countDown?exists>
                    			<a href="/invest/detail?id=${model.id}" class="status" style="background:#ccc;" id="tender${model.id}">待发布</a>
                    		<#else>
                    			<a href="/invest/detail?id=${model.id}" class="status">立即投标</a>
                    		</#if>
                    	</#if>
		            </div>
            	</#list>
            </#if>
        <#else>
        	<div class="item cnt" id="attorn">
            	<div class="investmentItem">
            		<#if (pageInfo?exists && pageInfo?size>0)>
        				<#list pageInfo.pageList as model>
		                    <h2 class="title">
		                    <u>
		                    <#if model.productId?? && model.productId = 3>E
		                    <#elseif model.productId?? && model.productId = 4>车
		                    <#elseif model.productId?? && model.productId = 5>房
		                    <#elseif model.productId?? && model.productId = 6>商
		                    <#elseif model.productId?? && model.productId = 7>押
		                    <#elseif model.productId?? && model.productId = 10>担
		                    </#if>
		                    </u><#if model.title?exists>${model.title}</#if>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		                    <em>
		                    <#if model.paymentMode?? && model.paymentMode = 1>${model.productName!}，一次性还款
	                    	<#elseif model.paymentMode?? && model.paymentMode = 2>${model.productName!}，等额本息
	                    	<#elseif model.paymentMode?? && model.paymentMode = 3>${model.productName!}，按期付息到期还本
	                    	</#if>
		                    </em> <i><#if model.createTime?exists>${model.createTime?string("yyyy-MM-dd")}</#if></i></h2>
		                    <ul class="money clearfix">
		                        <li class="moneyLZQ fl"><p><span><#if model.percent?exists>${model.percent/12/30}%</#if></span><br>预期天收益率</p><em></em></li>
		                        <li class="moneyCZQ fl" style="text-align:center;"><p><span><#if model.period?exists>${model.period}</#if></span>期<br>转让期数</p><em></em></li>
		                        <li class="moneyRZQ fl" style="text-align:center;"><p><span><#if model.amount?exists>${model.amount}</#if></span>元<br>剩余本金</p><em></em></li>
		                        <li class="moneyR1 fl"><p><span><#if model.min?exists>${model.min}</#if></span>元<br>转让价格</p></li>
		                        <!--<li class="moneyR2 fl"><p><span>${model.min/model.amount}%</span><br>折价率</p></li>-->
		                        <a href="/change/detail?id=${model.id}" class="status" <#if model.status=='Y' || model.status=='C'>style="background:#CCCCCC;"</#if>>
			                	<#if model.status=='T'>
									立即承接
								<#elseif model.status=='C'>
									审核中
								<#elseif model.status=='Y'>
									已完成
								</#if>
							</a>
		                    </ul>
		                	
	                	</#list>
	                </#if>
	            </div>
	        </div>
        </#if>
            <!--<a href="#" class="icon TIcon">更多<em class="iconfont">&#xe605;</em></a>-->
            <!-- 分页组件开始 -->
			<div class="tcdPageCode"></div>
			<!-- 分页组件结束 -->
        </div>
    </div>
    <div id="footer">
        <div class="content">
            <#include "../base/foot.ftl" />        
        </div>
    </div>
</div>
<script type="text/javascript" src="${_front_js}/jquery.page.js"></script>
<script>
$("#productList").children("li").click(function(){
	var productId = $(this).attr("p");
	if('change' == productId){
		window.location.href="/invest/list?type="+productId ; 
	}else{
		window.location.href="/invest/list?productId="+productId;
	}
});
var type = "<#if type?exists>${type}</#if>"; 
if("borrow"==type){
	$(".tcdPageCode").createPage({
	    pageCount:${pageInfo.pages},
	    current:${pageInfo.index},
	    backFn:function(index){
			window.location.href="/invest/list?index="+index+"&productId=${productId!}&deadline=${deadline!}&paymentMode=${paymentMode!}&full=${full!}";
	    }
	});
}else{
	$(".tcdPageCode").createPage({
	    pageCount:${pageInfo.pages},
	    current:${pageInfo.index},
	    backFn:function(index){
			window.location.href="/invest/list?type=change&index="+index+"&productId=${productId!}&deadline=${deadline!}&paymentMode=${paymentMode!}&full=${full!}";
	    }
	});
}

//hover事件改变样式
$(function() {
	financeItemTab();
});
function financeItemTab(){
    var p = <#if productId?exists>${productId}<#else>-1</#if>;
    var itemLi = $('#financeMain .screenItem li');
    itemLi.hover(function(){
    	if($(this).attr("p") == p) return;
        $(this).addClass("hover").append('<span class="arrow"></span>');
    },function(){
    	if($(this).attr("p") == p) return;
    	$(this).removeClass('hover').children('span').remove();
    })
}
$(".paramsList dl dd").click(function(){
	var h = $(this).attr("h");
	window.location.href=h;
});
</script>
</body>
</html>